<div style="min-width:800px;">
  <nz-breadcrumb class="breadcrumb-pos">
    <i nz-icon type="link" theme="outline" style="color:#1890FF;padding-right:4px"></i>
    <nz-breadcrumb-item>
      设备抄表记录
    </nz-breadcrumb-item>
  </nz-breadcrumb>
  <div nz-row [nzGutter]="16" style="border-bottom: 1px solid #ccc;margin-bottom: 8px;min-width: 800px;">
    <div nz-col [nzSpan]="6">
      <nz-form-item nzFlex>
        <nz-form-label>设备名称</nz-form-label>
        <nz-form-control>
          <input nz-input [(ngModel)]="name">
        </nz-form-control>
      </nz-form-item>
    </div>
    <div nz-col [nzSpan]="6">
      <nz-form-item nzFlex>
        <nz-form-label>租赁客户</nz-form-label>
        <nz-form-control>
          <input nz-input [(ngModel)]="companyName">
        </nz-form-control>
      </nz-form-item>
    </div>
    <div nz-col [nzSpan]="6">
      <nz-form-item nzFlex>
        <nz-form-label>是否被统计</nz-form-label>
        <nz-select [(ngModel)]="isStatistics" style="margin-top:3px;">
          <nz-option [nzLabel]="'全部'" [nzValue]="''"></nz-option>
          <nz-option [nzLabel]="'未统计'" [nzValue]="'0'"></nz-option>
          <nz-option [nzLabel]="'已统计'" [nzValue]="'1'"></nz-option>
        </nz-select>
        <button nz-button [nzType]="'primary'" [nzLoading]="btn_loading" style="margin:3px 0 0 20px;" (click)="getMeterlist()">查询</button>
      </nz-form-item>
    </div>
  </div>

  <div class="add_btn">
    <button nz-button style="float:right" (click)="exportOut()">导出Excel</button>
  </div>
  <nz-table #basicTable [nzData]="meterlist" [nzLoading]="loading" [nzShowPagination]="false" [nzBordered]="true">
    <thead>
      <tr>
        <th>设备名称</th>
        <th>是否被统计</th>
        <th>租赁客户</th>
        <th>统计时间</th>
        <th nzWidth="175px">黑白
          <hr>起始量 / 结束量 / 打印量</th>
        <th nzWidth="175px">彩色
          <hr>起始量 / 结束量 / 打印量</th>
      </tr>
    </thead>
    <tbody>
      <tr *ngFor="let data of meterlist">
        <td>{{printerinfo[data.printerId]?printerinfo[data.printerId].name:""}}</td>
        <td>{{data.isStatistics?"已统计":"未统计"}}</td>
        <td>{{userinfo[data.userId].companyName}}</td>
        <td>{{data.dateStatistics.slice(0,10)}}</td>
        <td>{{data.blackStartNum}} / {{data.blackEndNum}} / {{data.blackYieldSum}}</td>
        <td>{{data.coloursStartNum}} / {{data.coloursEndNum}} / {{data.coloursYieldSum}}</td>
      </tr>
    </tbody>
  </nz-table>
  <nz-pagination style="float:right;margin-top:12px" [nzPageIndex]="PageIndex" [nzPageSize]="PageSize"
    [nzTotal]="PageTotal" (nzPageIndexChange)="PageIndexChange($event)" [nzHideOnSinglePage]="true"
    [nzShowTotal]="totalTemplate"></nz-pagination>
  <ng-template #totalTemplate let-total>
    共 {{total}} 条数据
  </ng-template>
</div>